<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ include file="header.jsp" %>
<head>

<title>${frontTitle }</title>
<link type="text/css" rel="stylesheet" href="m/css/css.css"/>
<script type="text/javascript" src="m/js/jquery.min.js"></script>
<style type="text/css">
body{ background-image:url(m/images/index_bg.png); height:auto;margin-bottom:30%;}
.clear{ clear:both;} 
h2{ font:normal 18px "黑体"; color:#fff;line-height:26px; }
h3{color:#999; font-size:14px; font-weight:normal; padding:0 0 15px;}
*{ margin:0; padding:0;}
.main{ width:100% display:none}
.main .img{ width:100%; line-height:0px;}
.order,.activity,.members{ margin:10px 0 0 0 ;position:relative; }
.main .img img{ width:100%;}
.main .txt{width:50%; margin:0 auto; background:url(m/images/index_txt.png) no-repeat; background-size:contain; background-position:bottom;  position:absolute; text-align:center;line-height:26px; bottom:0px;right:25%; z-index:1;}
.main a{ text-decoration:none;}
</style>
<script type="text/javascript">
document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
WeixinJSBridge.call('hideToolbar');
});
</script>
</head>
<body>
		
	<div class="main"><!-- 现在不显示了 -->
    
    	<div class="order">
        	<a href="category?cid=${loginId }#mp.weixin.qq.com">
                <div class="img"><img src="${frontRestaurant }"></div>
               <!-- <div class="txt"><h2>店铺预订 ></h2></div> --> 
            </a>
        </div>
        <div class="clear"></div>
        <div class="activity">
        	<a href="listActivities">
                <div class="img"><img src="${frontActivity }"></div>
                
            </a>
        </div>
        
        <div class="members" id="user">
        	<a href="javascript:void(0);">
                <div class="img"><img src="${frontMember }"></div>

            </a>
        </div>
    	
    </div>
    <div class="footer">服务支持：億萬ONE</div>
    
    <script type="text/javascript">
    $(document).ready(function(){
    	
    	//--- 会员专区 START
    	$("#user").click(function(){ 
    		var userId = '${sessionScope.user.id}';
    		var cid = '${cid}';
    		if(null == userId || userId == ''|| userId == 'null'){
    			location.href = "user/login?cid="+cid;
    		}else{
    			location.href = "user/backend?cid="+cid+"&userId="+userId;
    		}
    	});
    	//--- 会员专区 END
    });
	</script>
<script type="text/javascript">
var append = "cid=${loginId}";
$.each($('a'), function(i,val){
	if(typeof(val.href)!="undefined") {
		if(val.href.indexOf('javascript')!=-1)
			return;
		if(val.href.indexOf('cid=')!=-1)
			return;
		var reg=new RegExp("#$");     
	    if(reg.test(val.href))     
			return;
	    reg=new RegExp("^tel:");     
	    if(reg.test(val.href))     
			return;
		var oldUrl = val.href;
		var newUrl = oldUrl;
		var position = oldUrl.indexOf("?");
		if(position==-1) {
			newUrl = oldUrl+"?"+append;
		} else {
			newUrl = oldUrl+"&"+append;
		}
		val.href=newUrl;
	}
});   
</script>
</body>

</html>